<?php defined('_JEXEC') or die; 
/**
 * @package pmapi
 * @copyright Copyright (c)2014 Enrico Fagnoni
 * @license GNU General Public License version 3, or later
 *
 * @since 1.0.0
 */
?>
<?=$this->getTurtlePrefixes()?> 
@prefix u: <<?=UriHelper::mkNamespace('product')?>> .
@prefix : <#> .

<?=$this->getDefaultMetadata()?>

<?php if( $this->isSinglePageResource()):?>
<>  a ldpp:Page; 
    ldpp:pageOf <<?=$this->pagedURI?>> 
.
<?php endif?>

<?php if( $this->inFirstPage()):?>
<<?=$this->pagedURI?>>  
    a ldp:DirectContainer ;
    void:inDataset <<?=UriHelper::mkResourceURI()?>> ;
    foaf:primaryTopic <<?=$this->pagedURI?>#dataset> ;
    ldp:membershipResource <<?=$this->pagedURI?>#dataset> ;
    ldp:hasMemberRelation void:dataDump ;
    ldp:insertedContentRelation foaf:primaryTopic ;
.
<?php endif?>

<<?=$this->pagedURI?>#dataset> a void:Dataset ;
    rdfs:label <?=ApiHelper::_T('PMAPI_USERS_DS_LABEL')?> ;
    rdfs:comment <?=ApiHelper::_T('PMAPI_USERS_DS_DESCRIPTION')?> ;
    foaf:homepage <<?=$this->getHomepage()?>> ;
    void:dataDump <?= implode(',', array_map(
                        function($item)  {
                            return 'u:'.$item->virtuemart_user_id;
                        }, $this->items
                      ));
                  ?> ; 
.
<?php 
if(JDEBUG){
    echo "#------------------ START DEBUGGING INFO -------------------------\n#";
    //print_r($this);
    echo preg_replace("/\n/", "\n#", ApiHelper::debugInfo($this));
    echo "\n#------------------ END DEBUGGING INFO -------------------------\n";
}
?>